<?php
namespace app\common\model;
use think\Model;

class AtlasCategoryModel extends Model{
    protected  $name = 'atlas_category';
    protected  $pk   = 'category_id';

    public static function onBeforeInsert($model)
    {
        $model->set("create_ip", request()->ip());
    }
}